<template>
  <div id="app">
    <Header v-if="isMainPage" ref="header"/>
    <router-view ref="section"/>
    <Footer v-if="isMainPage"/>
  </div>
</template>


<script>
  import {mapState} from 'vuex';
  import Header from 'comp/Header.vue';
  import Footer from 'comp/Footer.vue';

  export default {
    name: "Index",
    components: {
      Header,
      Footer
    },
    computed: {
      ...mapState(['pageInfo']),
      isMainPage() {
        let flag = !!0;
        if (!this.pageInfo.name || ['login', '404','video'].indexOf(this.pageInfo.name) < 0) flag = !!1;
        return flag;

      }
    }
  }
</script>
<style lang="scss">
  @import "~css/bmap.css";
  @import '~css/element-#006AA5/index.css';
  @import "~kkui/kkui.css";
  @import "~css/base.scss";
</style>
